<?php if (count($model) > 0) { ?>

    <div id="vj_box_pro_300" style="margin-right: 8px" class="float-left">
        <div class="vj_title_rv">
            <b>Sản phẩm bán chạy nhất</b>
        </div>
        <div class="vj_content_300">
            <ul>
                <?php foreach ($model as $item) { ?>
                    <li>
                        <b>
                            <a href="<?php echo TreTodayUrl::getProductUrl($item->product_id, $item->product_name) ?>">
                                <?php echo $item->product_name ?>
                            </a>
                        </b>

                        <div class="vj_gh_detail">
                            <a href="<?php echo TreTodayUrl::getProductUrl($item->product_id, $item->product_name) ?>">
                                <img height="88" width="88" src="<?php echo TreTodayUrl::getBlankImage() ?>" alt=""
                                     style="background: transparent url('<?php echo TreTodayUrl::getPictureUrl($item->image != null ? $item->image->image_path : Yii::app()->params['no-image']) ?>')
                                         no-repeat scroll center center;"/>
                            </a>

                            <p>
                                Giá:
                                <strong>
                                    <label>
                                        <?php echo TreTodayCommon::formatPrice($item->price, $item->currency) ?>
                                    </label>
                                </strong>
                                <br/>
                                Phạm vi: <?php echo TreTodayCommon::getLocationName($item->location) ?><br/>
                                Người bán:
                                <a href="<?php echo TreTodayUrl::getUserUrl($item->user_id, $item->user_name) ?>">
                                    <?php echo $item->user_name ?></a>
                        <span>Ngày: <?php echo TreTodayCommon::formatDate($item->add_time) ?>
                            | Xem: <?php echo $item->views ?></span>
                            </p>
                        </div>
                    </li>
                <?php } ?>
            </ul>
        </div>
    </div>

<?php } ?>